             package com.java.diagnostics.visualizer.recommender.switchToBalanced;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.DataPoint;
             import com.java.diagnostics.visualizer.data.TupleData;
             import com.java.diagnostics.visualizer.parser.vgc.constants.VGCGCReasons;
             import com.java.diagnostics.visualizer.recommender.Recommendation;
             import com.java.diagnostics.visualizer.recommender.RecommendationBase;
             import com.java.diagnostics.visualizer.recommender.util.RecommendationLabels;
             import java.text.MessageFormat;
             
             public class LookForLongPauses
               extends RecommendationBase
               implements Recommendation
             {
               public void recommend(AggregateData data)
               {
                 Object gcMode = getGCMode(data);
                 
                 if ((("optthruput".equals(gcMode)) || ("optavgpause".equals(gcMode))) && 
                   (is26VM(data))) {
                   TupleData pauseTimes = data
                     .getTupleData("VGCLabels.pause.times.without.exclusive.access");
                   TupleData reasonRecord = data
                     .getTupleData("VGCLabels.gc.reasons");
                   if ((pauseTimes != null) && (reasonRecord != null)) {
                     DataPoint[] pausePoints = pauseTimes.getDataPoints();
                     double meanPause = pauseTimes.getRawMeanY();
                     int longPauses = 0;
                     
                     for (DataPoint pause : pausePoints) {
                       double reason = reasonRecord.getDataPoint(
                         pause.getSequenceUID()).getRawY();
                       
                       if ((reason != VGCGCReasons.SYS_INT) && 
                         (pause.getRawY() > 5.0D * meanPause)) {
                         longPauses++;
                       }
                     }
                     
                     if (longPauses > 0) {
                       addWarning(data, MessageFormat.format(
                         RecommendationLabels.LONG_OPTTHRUPUT_OPTAVGPAUSE_WARNING, 
                         new Object[] { Integer.valueOf(longPauses), 
                         Integer.valueOf(pauseTimes.length()) }));
                     }
                   }
                 }
               }
             }


